import os
basedir = os.path.abspath(os.path.dirname(__file__))


class Config:
    SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
    MAIL_SERVER = 'smtp.163.com'
    MAIL_PORT = 465
    MAIL_USE_SSL = True
    MAIL_USERNAME = 'uestc_like@163.com'  # os.environ.get('MAIL_USERNAME')
    MAIL_PASSWORD = 'Asdfghjkl123'  # os.environ.get('MAIL_PASSWORD')
    FLASKY_MAIL_SUBJECT_PREFIX = '[数字健康工程技术研究中心]'
    FLASKY_MAIL_SENDER = '数字健康工程技术研究中心 <uestc_like@163.com>'
    FLASKY_ADMIN = 'uestc_like@163.com'  # os.environ.get('FLASKY_ADMIN')
    SQLALCHEMY_DATABASE_URI = 'mysql://102Xi102:X123456i@211.83.111.224:3306/emr_test'
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True
    SQLALCHEMY_TRACK_MODIFICATIONS = True

    @staticmethod
    def init_app(app):
        pass


class DevelopmentConfig(Config):
    DEBUG = True


class TestingConfig(Config):
    TESTING = True


class ProductionConfig(Config):
    pass


config = {
    'development': DevelopmentConfig,
    'testing': TestingConfig,
    'production': ProductionConfig,

    'default': DevelopmentConfig
}
